class Match < ActiveRecord::Base
  belongs_to :ladder
  has_many :competitions
  has_many :fighters, :through => :competitions

  extend FriendlyId
  friendly_id :slug_candidates, use: :slugged
  def slug_candidates
    [
      [fighters.first.nickname, 'vs', fighters.last.nickname,  'fight-no', :id, ladder.city],
    ]
  end

end
